#ifndef __CSTRING_H__ 
#define __CSTRING_H__ 

#include <stdio.h>
#include "WinToLinux.h"

class CString  {
    public:
		CString(char *str = NULL);
		CString(const char *str);
        CString(const CString &other);     // 拷贝构造函数
        ~ CString(void);         // 析构函数
        CString & operator =(const CString &other); // 赋值函数
		CString & operator =(const char * other);
		CString & operator =(char *other);
		BOOL operator==( const CString &right ) const;
		BOOL operator!=( const CString &right ) const
		{ 
			return !(*this == right); 
		}
		char *GetString()const;
		BOOL IsEmpty()const;
		int GetLength()const;
		int Compare(const char * str)const;
		CString Left(int nCount)const;
		CString Right(int nCount)const;
        int SpanIncluding(LPCTSTR lpszCharSet)const;
    private:
        char   *m_data;    // 用于保存字符串  
};
int _ttoi(CString str);
#endif

